package com.ruoyi.product.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商品SPU对象 product_spu
 * 
 * @author liuhuizhong
 * @date 2025-08-07
 */
@Data
public class ProductSpu extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** SPU ID */
    private Long id;

    /** 商品分类ID */
    @Excel(name = "商品分类ID")
    private Long categoryId;

    /** 商品模板ID */
    private Long templateId;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String name;

    /** 副标题/促销语 */
    @Excel(name = "副标题/促销语")
    private String subTitle;

    /** 商品描述 */
    @Excel(name = "商品描述")
    private String description;

    /** 状态：0-下架，1-上架 */
    @Excel(name = "状态：0-下架，1-上架")
    private Long status;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    @Override
    public String toString() {
        return "ProductSpu{" +
                "id=" + id +
                ", categoryId=" + categoryId +
                ", templateId=" + templateId +
                ", name='" + name + '\'' +
                ", subTitle='" + subTitle + '\'' +
                ", description='" + description + '\'' +
                ", status=" + status +
                ", createdAt=" + createdAt +
                ", updatedAt=" + updatedAt +
                '}';
    }
}
